Optimal. Leaf size=46 \[ -\frac {a^2 \cot (e+f x)}{f}+\frac {2 a b \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3744, 276}
\begin {gather*} -\frac {a^2 \cot (e+f x)}{f}+\frac {2 a b \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 276
Rule 3744
Rubi steps
\begin {align*} \int \csc ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \left (2 a b+\frac {a^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a^2 \cot (e+f x)}{f}+\frac {2 a b \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 44, normalized size = 0.96 \begin {gather*} \frac {-3 a^2 \cot (e+f x)+b \left (6 a-b+b \sec ^2(e+f x)\right ) \tan (e+f x)}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 48, normalized size = 1.04
method | result | size |
derivativedivides | \(\frac {\frac {b^{2} \left (\sin ^{3}\left (f x +e \right )\right )}{3 \cos \left (f x +e \right )^{3}}+2 a b \tan \left (f x +e \right )-a^{2} \cot \left (f x +e \right )}{f}\) | \(48\) |
default | \(\frac {\frac {b^{2} \left (\sin ^{3}\left (f x +e \right )\right )}{3 \cos \left (f x +e \right )^{3}}+2 a b \tan \left (f x +e \right )-a^{2} \cot \left (f x +e \right )}{f}\) | \(48\) |
risch | \(-\frac {2 i \left (3 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-6 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+3 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+9 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-6 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-3 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+9 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+6 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 a^{2}+6 a b -b^{2}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 44, normalized size = 0.96 \begin {gather*} \frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) - \frac {3 \, a^{2}}{\tan \left (f x + e\right )}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.16, size = 75, normalized size = 1.63 \begin {gather*} -\frac {{\left (3 \, a^{2} + 6 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2} \csc ^{2}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.81, size = 44, normalized size = 0.96 \begin {gather*} \frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) - \frac {3 \, a^{2}}{\tan \left (f x + e\right )}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.86, size = 67, normalized size = 1.46 \begin {gather*} \frac {-3\,a^2\,{\cos \left (e+f\,x\right )}^4+6\,a\,b\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^2+b^2\,{\sin \left (e+f\,x\right )}^4}{3\,f\,{\cos \left (e+f\,x\right )}^3\,\sin \left (e+f\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________